var qqmapsdk, app = getApp(),
  Data = require("../../utils/util.js"),
  QQMapWX = require("../../../utils/qqmap-wx-jssdk.js");
var url = "https://huadian.sjwke.com/attachment/";
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: {
      img: "http://e.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=387b6c01cfbf6c81f76224ec890e9d03/11385343fbf2b21137ea0d27c98065380dd78e97.jpg",
      name: "Margin_W",
    },

    userPost: [
    ]

  },
  // 查看详情
  see: function (t) {
    this.data.seller;
    var e = t.currentTarget.dataset.id;
    wx.navigateTo({
      url: "../infodetial/infodetial?id=" + e,
      success: function (t) { },
      fail: function (t) { },
      complete: function (t) { }
    });
  },
  onLoad: function(options) {
    let that = this
    console.log(wx.getStorageSync("users").id)
    app.util.request({
      url: "entry/wxapp/MyInfo",
      cachetime: "30",
      data:{
        user_id: wx.getStorageSync("users-info").id
      },
      success: function(t) {
        console.log(t)
        that.setData({
          userPost: t.data.user_content,
          userInfo: t.data.user_info,
          url: url
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})